package com.youshang520i;

import com.youshang520i.dao.StudentDao;
import com.youshang520i.model.StudentModel;
import com.youshang520i.service.StudentService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author youshang
 */
public class MyMainTx {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext acac = new AnnotationConfigApplicationContext(AppTx.class);

        StudentService studentService = acac.getBean(StudentService.class);
        StudentModel studentModel = new StudentModel();
        studentModel.setId(11);
        studentModel.setName("zs");
        System.out.println("insert ->>>>>>>>>>>> " + studentService.insert(studentModel));

    }
}
